package ru.bragnikita.test.log;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.LogManager;
import java.util.logging.Logger;

/**
 * @author Nikita.Brazhnikov
 */
public class SMTPLogJULI {


	public static void main(String[] args) throws IOException {
		LogManager.getLogManager().readConfiguration(SMTPLogJULI.class.getClassLoader().getResourceAsStream("logging.properties"));
		Logger logger = Logger.getLogger(SMTPLogJULI.class.getName());
		logger.log(Level.INFO, "Info message");
		logger.log(Level.SEVERE, "Error message");
		for (int i = 0; i != 10000; ++i) {
			logger.log(Level.INFO, "Info msg {0}", i);
		}
		logger.log(Level.SEVERE, "Error message");
	}
}
